import { request } from 'umi';

/**
 * 获取所有输出源
 */
export const screenshot = (server: string, workerName: string) => {
  return request<any>(`${server}/source/screenshot`, {
    params: { workerName },
  });
};

/**
 * 获取所有输出源配置
 */
export const saveScreenshot = (
  server: string,
  workerName: string,
  fileName?: string,
) => {
  return request<any>(`${server}/source/saveScreenshot`, {
    params: { workerName, fileName },
  });
};
